import java.math.BigDecimal;
import java.util.Arrays;

/**
 * @author 03010570
 * @date 2020/06/11
 * describe:
 * 随手写的一些测试类
 */
public class TestMain {

    public static void main(String[] args) {
        BigDecimal decimal = new BigDecimal(10);
        BigDecimal divide = decimal.divide(new BigDecimal(3),2,BigDecimal.ROUND_DOWN);
        System.out.println(divide);
    }

    private static void fun1() {
        String[] strings = {"D", "1", "a", "F", "2", "B", "c", "3", "4", "A", "z"};
        int[] ints = {1,2,3,45,3,4,6,3};
        Arrays.sort(ints);
        caseSort2(strings);
        for (String string : strings) {
            System.out.print(string + " , ");
        }
    }

    public static void caseSort2(String[] strings) {
        int start = 0;
        int end = strings.length - 1;
        for (; start < end; ) {
            if (Character.isLowerCase(strings[start].charAt(0))) {
                start++;
            }
            if (!Character.isLowerCase(strings[end].charAt(0))) {
                end--;
            }
            if (!Character.isLowerCase(strings[start].charAt(0)) && Character.isLowerCase(strings[end].charAt(0))) {
                String temp = strings[start];
                strings[start] = strings[end];
                strings[end] = temp;
            }
        }
        end = strings.length - 1;
        for (; start < end; ) {
            if (Character.isDigit(strings[start].charAt(0))) {
                start++;
            }
            if (!Character.isDigit(strings[end].charAt(0))) {
                end--;
            }
            if (!Character.isDigit(strings[start].charAt(0)) && Character.isDigit(strings[end].charAt(0))) {
                String temp = strings[start];
                strings[start] = strings[end];
                strings[end] = temp;
            }
        }

    }

    public static void caseSort(String[] strings) {
        int start = 0;
        int end = strings.length - 1;
        for (; start < end; ) {
            if (Character.isLowerCase(strings[start].charAt(0))) {
                start++;
            }
            if (!Character.isLowerCase(strings[end].charAt(0))) {
                end--;
            }
            if (!Character.isLowerCase(strings[start].charAt(0)) && Character.isLowerCase(strings[end].charAt(0))) {
                String temp = strings[start];
                strings[start] = strings[end];
                strings[end] = temp;
            }
        }
    }
}
